<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateSocialProfileTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('user_social_profile', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('user_id')->default(0)->comment('用户ID');
            $table->unsignedTinyInteger('height')->default(0)->comment('身高');
            $table->unsignedTinyInteger('weight')->default(0)->comment('体重');
            $table->string('marriage', 10)->default('单身')->comment('婚姻状态');
            $table->string('job', 20)->default('')->comment('职业');
            $table->string('want', 50)->default('')->comment('诉求');
            $table->timestamps();
            $table->unique('user_id', 'user_id');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('user_social_profile');
    }
}
